package org.socialresume.client.mvp.view;

import org.socialresume.client.mvp.presenter.MainPresenter;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;

public class MainUI extends Composite implements MainPresenter.Display{

	private static MainUIUiBinder uiBinder = GWT.create(MainUIUiBinder.class);

	interface MainUIUiBinder extends UiBinder<Widget, MainUI> {
	}

	@UiField protected SimplePanel header;
	@UiField protected SimplePanel body;
	@UiField protected SimplePanel footer;

	public MainUI() {
		initWidget(uiBinder.createAndBindUi(this));
	}
	
	@Override
	public void addFooter(org.enunes.gwt.mvp.client.view.Display display) {
		footer.setWidget(display.asWidget());
	}

	@Override
	public void addHeader(org.enunes.gwt.mvp.client.view.Display display) {
		header.setWidget(display.asWidget());
	}

	@Override
	public Widget asWidget() {
		return this;
	}

	@Override
	public void addBody(org.enunes.gwt.mvp.client.view.Display display) {
		body.setWidget(display.asWidget());
	}

}
